<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Markdown 拓展 | VuePress</title>
    <meta name="description" content="Vue 驱动的静态网站生成器">
    <link rel="icon" href="/vuepress-theme-purple/logo.png">
  <link rel="manifest" href="/vuepress-theme-purple/manifest.json">
  <meta name="theme-color" content="#3eaf7c">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <link rel="apple-touch-icon" href="/vuepress-theme-purple/icons/apple-touch-icon-152x152.png">
  <link rel="mask-icon" href="/vuepress-theme-purple/icons/safari-pinned-tab.svg" color="#3eaf7c">
  <meta name="msapplication-TileImage" content="/icons/msapplication-icon-144x144.png">
  <meta name="msapplication-TileColor" content="#000000">
    
    <link rel="preload" href="/vuepress-theme-purple/assets/css/0.styles.4750dc60.css" as="style"><link rel="preload" href="/vuepress-theme-purple/assets/js/app.a1c2f8fd.js" as="script"><link rel="preload" href="/vuepress-theme-purple/assets/js/5.ceb67ac2.js" as="script"><link rel="preload" href="/vuepress-theme-purple/assets/js/4.0adfbd1a.js" as="script"><link rel="preload" href="/vuepress-theme-purple/assets/js/13.30b10f5f.js" as="script"><link rel="preload" href="/vuepress-theme-purple/assets/js/7.18012d7b.js" as="script"><link rel="preload" href="/vuepress-theme-purple/assets/js/6.14f6ca82.js" as="script"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/10.a5a6ea3e.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/100.ec2ceaa9.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/101.6dfa1a45.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/102.11915ae0.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/11.2ec43fbc.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/12.e5cec480.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/14.9d9396ac.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/15.8e9556f8.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/16.2ce11086.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/17.7bbf8455.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/18.1d45c66b.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/19.0ff815f1.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/20.a19a1201.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/21.0367ba8f.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/22.0b9a8718.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/23.78c12ede.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/24.19cd8818.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/25.5eaa46dc.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/26.f38b21a1.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/27.0785a519.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/28.d23df74d.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/29.2f2dd6ca.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/30.a1bed37f.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/31.7a5b7b61.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/32.2a38681f.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/33.29933d35.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/34.df24a0ef.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/35.23d86e21.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/36.3c551b3f.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/37.832cb8d4.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/38.47f6c955.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/39.6f51d483.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/40.b69df168.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/41.0f0c7aa2.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/42.7b1d48b5.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/43.2c5e9b01.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/44.b339774e.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/45.6206eef7.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/46.119a0a86.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/47.eb84c6c2.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/48.c31f8327.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/49.3e055789.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/50.6c78c9fc.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/51.343c71a0.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/52.76de97d9.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/53.a377d1ca.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/54.8b342bc9.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/55.465812e1.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/56.98edd7cd.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/57.eeca3305.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/58.a58b8904.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/59.f6d4b102.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/60.92072575.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/61.2777f097.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/62.f4effeca.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/63.658ff6dc.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/64.0987e73f.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/65.36b268a4.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/66.60412057.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/67.5b563239.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/68.5ecac304.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/69.37c6e078.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/70.f7a710e9.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/71.24bb765b.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/72.f770f72d.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/73.28783a42.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/74.67fcabaf.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/75.785ce193.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/76.48a6ef71.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/77.a8133ac0.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/78.b950bccd.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/79.846d11a1.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/8.b4abe17a.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/80.e746a20b.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/81.9ad3a7b4.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/82.7daf65f4.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/83.d506c84b.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/84.86d70e47.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/85.45ae9504.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/86.5ecfb585.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/87.a75e695f.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/88.39411bf5.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/89.a18a78c1.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/9.c4d21b85.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/90.45813435.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/91.a9b7f9e9.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/92.3f789f66.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/93.3420f93e.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/94.eac427a9.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/95.2b3fcbfb.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/96.263a20f3.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/97.506fd3ae.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/98.4d8c9524.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/99.ee01147c.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/vendors~flowchart.9a3d1af6.js"><link rel="prefetch" href="/vuepress-theme-purple/assets/js/vendors~notification.1cc30b22.js">
    <link rel="stylesheet" href="/vuepress-theme-purple/assets/css/0.styles.4750dc60.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="navbar-container"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/vuepress-theme-purple/zh/" class="home-link router-link-active"><!----> <span class="site-name">VuePress</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/vuepress-theme-purple/zh/guide/" class="nav-link router-link-active">指南</a></div><div class="nav-item"><a href="/vuepress-theme-purple/zh/config/" class="nav-link">配置</a></div><div class="nav-item"><a href="/vuepress-theme-purple/zh/plugin/" class="nav-link">插件</a></div><div class="nav-item"><a href="/vuepress-theme-purple/zh/theme/" class="nav-link">主题</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="了解更多" class="dropdown-title"><span class="title">了解更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>API</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/api/cli.html" class="nav-link">CLI</a></li><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/api/node.html" class="nav-link">Node</a></li></ul></li><li class="dropdown-item"><h4>开发指南</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/miscellaneous/local-development.html" class="nav-link">本地开发</a></li><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/miscellaneous/design-concepts.html" class="nav-link">设计理念</a></li><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/faq/" class="nav-link">FAQ</a></li><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/miscellaneous/glossary.html" class="nav-link">术语</a></li></ul></li><li class="dropdown-item"><h4>其他</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/miscellaneous/migration-guide.html" class="nav-link">从 0.x 迁移</a></li><li class="dropdown-subitem"><a href="https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Changelog
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul></div></div><div class="nav-item"><a href="https://v0.vuepress.vuejs.org/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  0.x
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="选择语言" class="dropdown-title"><span class="title">选择语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/vuepress-theme-purple/guide/markdown.html" class="nav-link">English</a></li><li class="dropdown-item"><!----> <a href="/vuepress-theme-purple/zh/guide/markdown.html" class="nav-link router-link-exact-active router-link-active">简体中文</a></li></ul></div></div> <a href="https://github.com/fengxinming/vuepress-theme-purple" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav></div></div></header> <div class="page-container"><div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/vuepress-theme-purple/zh/guide/" class="nav-link router-link-active">指南</a></div><div class="nav-item"><a href="/vuepress-theme-purple/zh/config/" class="nav-link">配置</a></div><div class="nav-item"><a href="/vuepress-theme-purple/zh/plugin/" class="nav-link">插件</a></div><div class="nav-item"><a href="/vuepress-theme-purple/zh/theme/" class="nav-link">主题</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="了解更多" class="dropdown-title"><span class="title">了解更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>API</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/api/cli.html" class="nav-link">CLI</a></li><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/api/node.html" class="nav-link">Node</a></li></ul></li><li class="dropdown-item"><h4>开发指南</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/miscellaneous/local-development.html" class="nav-link">本地开发</a></li><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/miscellaneous/design-concepts.html" class="nav-link">设计理念</a></li><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/faq/" class="nav-link">FAQ</a></li><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/miscellaneous/glossary.html" class="nav-link">术语</a></li></ul></li><li class="dropdown-item"><h4>其他</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/vuepress-theme-purple/zh/miscellaneous/migration-guide.html" class="nav-link">从 0.x 迁移</a></li><li class="dropdown-subitem"><a href="https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Changelog
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul></div></div><div class="nav-item"><a href="https://v0.vuepress.vuejs.org/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  0.x
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="选择语言" class="dropdown-title"><span class="title">选择语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/vuepress-theme-purple/guide/markdown.html" class="nav-link">English</a></li><li class="dropdown-item"><!----> <a href="/vuepress-theme-purple/zh/guide/markdown.html" class="nav-link router-link-exact-active router-link-active">简体中文</a></li></ul></div></div> <a href="https://github.com/fengxinming/vuepress-theme-purple" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>指南</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vuepress-theme-purple/zh/guide/" class="sidebar-link">介绍</a></li><li><a href="/vuepress-theme-purple/zh/guide/getting-started.html" class="sidebar-link">快速上手</a></li><li><a href="/vuepress-theme-purple/zh/guide/directory-structure.html" class="sidebar-link">目录结构</a></li><li><a href="/vuepress-theme-purple/zh/guide/basic-config.html" class="sidebar-link">基本配置</a></li><li><a href="/vuepress-theme-purple/zh/guide/assets.html" class="sidebar-link">静态资源</a></li><li><a href="/vuepress-theme-purple/zh/guide/markdown.html" class="active sidebar-link">Markdown 拓展</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#header-anchors" class="sidebar-link">Header Anchors</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#链接" class="sidebar-link">链接</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#front-matter" class="sidebar-link">Front Matter</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#github-风格的表格" class="sidebar-link">GitHub 风格的表格</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#emoji" class="sidebar-link">Emoji</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#目录" class="sidebar-link">目录</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#自定义容器" class="sidebar-link">自定义容器</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#代码块中的语法高亮" class="sidebar-link">代码块中的语法高亮</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#代码块中的行高亮" class="sidebar-link">代码块中的行高亮</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#行号" class="sidebar-link">行号</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#导入代码段" class="sidebar-link">导入代码段</a></li><li class="sidebar-sub-header"><a href="/vuepress-theme-purple/zh/guide/markdown.html#进阶配置" class="sidebar-link">进阶配置</a></li></ul></li><li><a href="/vuepress-theme-purple/zh/guide/using-vue.html" class="sidebar-link">在 Markdown 中 使用 Vue</a></li><li><a href="/vuepress-theme-purple/zh/guide/i18n.html" class="sidebar-link">多语言支持</a></li><li><a href="/vuepress-theme-purple/zh/guide/deploy.html" class="sidebar-link">部署</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>深入</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vuepress-theme-purple/zh/guide/frontmatter.html" class="sidebar-link">Front Matter</a></li><li><a href="/vuepress-theme-purple/zh/guide/permalinks.html" class="sidebar-link">永久链接</a></li><li><a href="/vuepress-theme-purple/zh/guide/markdown-slot.html" class="sidebar-link">Markdown 插槽</a></li><li><a href="/vuepress-theme-purple/zh/guide/global-computed.html" class="sidebar-link">全局计算属性</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="markdown-拓展"><a href="#markdown-拓展" class="header-anchor">#</a> Markdown 拓展</h1> <h2 id="header-anchors"><a href="#header-anchors" class="header-anchor">#</a> Header Anchors</h2> <p>所有的标题将会自动地应用 anchor 链接，anchor 的渲染可以通过 <a href="/vuepress-theme-purple/zh/config/#markdown-anchor"><code>markdown.anchor</code></a> 来配置。</p> <h2 id="链接"><a href="#链接" class="header-anchor">#</a> 链接</h2> <h3 id="内部链接"><a href="#内部链接" class="header-anchor">#</a> 内部链接</h3> <p>网站内部的链接，将会被转换成 <code>&lt;router-link&gt;</code> 用于 SPA 导航。同时，站内的每一个文件夹下的 <code>README.md</code> 或者 <code>index.md</code> 文件都会被自动编译为 <code>index.html</code>，对应的链接将被视为 <code>/</code>。</p> <p>以如下的文件结构为例：</p> <div class="language- extra-class"><pre class="language-text"><code>.
├─ README.md
├─ foo
│  ├─ README.md
│  ├─ one.md
│  └─ two.md
└─ bar
   ├─ README.md
   ├─ three.md
   └─ four.md
</code></pre></div><p>假设你现在在 <code>foo/one.md</code> 中：</p> <div class="language-md extra-class"><pre class="language-md"><code><span class="token url">[<span class="token content">Home</span>](/)</span> <span class="token comment">&lt;!-- 跳转到根部的 README.md --&gt;</span>
<span class="token url">[<span class="token content">foo</span>](/foo/)</span> <span class="token comment">&lt;!-- 跳转到 foo 文件夹的 index.html --&gt;</span>
<span class="token url">[<span class="token content">foo heading</span>](./#heading)</span> <span class="token comment">&lt;!-- 跳转到 foo/index.html 的特定标题位置 --&gt;</span>
<span class="token url">[<span class="token content">bar - three</span>](../bar/three.md)</span> <span class="token comment">&lt;!-- 具体文件可以使用 .md 结尾（推荐） --&gt;</span>
<span class="token url">[<span class="token content">bar - four</span>](../bar/four.html)</span> <span class="token comment">&lt;!-- 也可以用 .html --&gt;</span>
</code></pre></div><h3 id="链接的重定向"><a href="#链接的重定向" class="header-anchor">#</a> 链接的重定向</h3> <p>VuePress 支持重定向到干净链接。如果一个链接 <code>/foo</code> 找不到，VuePress 会自行寻找一个可用的 <code>/foo/</code> 或 <code>/foo.html</code>。反过来，当 <code>/foo/</code> 或 <code>/foo.html</code> 中的一个找不到时，VuePress 也会尝试寻找另一个。借助这种特性，我们可以通过官方插件 <a href="https://vuepress.github.io/plugins/clean-urls/" target="_blank" rel="noopener noreferrer">vuepress-plugin-clean-urls<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> 定制你的网站路径。</p> <div class="custom-block tip"><p class="custom-block-title">注意</p> <p>无论是否使用了 permalink 和 clean-urls 插件，你的相对路径都应该依赖于当前的文件结构来定义。在上面的例子中，即使你将 <code>/foo/one.md</code> 的路径设为了 <code>/foo/one/</code>，你依然应该通过 <code>./two.md</code> 来访问 <code>/foo/two.md</code>。</p></div> <h3 id="外部链接"><a href="#外部链接" class="header-anchor">#</a> 外部链接</h3> <p>外部的链接将会被自动地设置为  <code>target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;</code>:</p> <ul><li><a href="https://vuejs.org" target="_blank" rel="noopener noreferrer">vuejs.org<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li> <li><a href="https://github.com/vuejs/vuepress" target="_blank" rel="noopener noreferrer">VuePress on GitHub<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul> <p>你可以自定义通过配置 <a href="/vuepress-theme-purple/zh/config/#markdown-externallinks">config.markdown.externalLinks</a> 来自定义外部链接的特性。</p> <h2 id="front-matter"><a href="#front-matter" class="header-anchor">#</a> Front Matter</h2> <p>VuePress 提供了对 <a href="https://jekyllrb.com/docs/frontmatter/" target="_blank" rel="noopener noreferrer">YAML front matter<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> 开箱即用的支持:</p> <div class="language-yaml extra-class"><pre class="language-yaml"><code><span class="token punctuation">---</span>
<span class="token key atrule">title</span><span class="token punctuation">:</span> Blogging Like a Hacker
<span class="token key atrule">lang</span><span class="token punctuation">:</span> en<span class="token punctuation">-</span>US
<span class="token punctuation">---</span>
</code></pre></div><p>这些数据可以在当前 markdown 的正文，或者是任意的自定义或主题组件中使用。</p> <p>想了解更多，请移步 <a href="/vuepress-theme-purple/zh/guide/frontmatter.html">Front Matter</a>。</p> <h2 id="github-风格的表格"><a href="#github-风格的表格" class="header-anchor">#</a> GitHub 风格的表格</h2> <p><strong>输入</strong></p> <div class="language- extra-class"><pre class="language-text"><code>| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |
</code></pre></div><p><strong>输出</strong></p> <table><thead><tr><th>Tables</th> <th style="text-align:center;">Are</th> <th style="text-align:right;">Cool</th></tr></thead> <tbody><tr><td>col 3 is</td> <td style="text-align:center;">right-aligned</td> <td style="text-align:right;">$1600</td></tr> <tr><td>col 2 is</td> <td style="text-align:center;">centered</td> <td style="text-align:right;">$12</td></tr> <tr><td>zebra stripes</td> <td style="text-align:center;">are neat</td> <td style="text-align:right;">$1</td></tr></tbody></table> <h2 id="emoji"><a href="#emoji" class="header-anchor">#</a> Emoji</h2> <p><strong>输入</strong></p> <div class="language- extra-class"><pre class="language-text"><code>:tada: :100:
</code></pre></div><p><strong>输出</strong></p> <p>🎉 💯</p> <p>你可以在<a href="https://github.com/markdown-it/markdown-it-emoji/blob/master/lib/data/full.json" target="_blank" rel="noopener noreferrer">这个列表<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>找到所有可用的 Emoji。</p> <h2 id="目录"><a href="#目录" class="header-anchor">#</a> 目录</h2> <p><strong>输入</strong></p> <div class="language- extra-class"><pre class="language-text"><code>[[toc]]
</code></pre></div><p><strong>输出</strong></p> <p></p><div class="table-of-contents"><ul><li><a href="#header-anchors">Header Anchors</a></li><li><a href="#链接">链接</a><ul><li><a href="#内部链接">内部链接</a></li><li><a href="#链接的重定向">链接的重定向</a></li><li><a href="#外部链接">外部链接</a></li></ul></li><li><a href="#front-matter">Front Matter</a></li><li><a href="#github-风格的表格">GitHub 风格的表格</a></li><li><a href="#emoji">Emoji</a></li><li><a href="#目录">目录</a></li><li><a href="#自定义容器-badge-text-默认主题">自定义容器 <span class="badge tip" style="vertical-align:top;" data-v-c13ee5b0>默认主题</span></a></li><li><a href="#代码块中的语法高亮">代码块中的语法高亮</a></li><li><a href="#代码块中的行高亮">代码块中的行高亮</a></li><li><a href="#行号">行号</a></li><li><a href="#导入代码段-badge-text-beta-type-warning">导入代码段 <span class="badge warning" style="vertical-align:top;" data-v-c13ee5b0>beta</span></a></li><li><a href="#进阶配置">进阶配置</a></li></ul></div><p></p> <p>目录（Table of Contents）的渲染可以通过  <a href="/vuepress-theme-purple/zh/config/#markdown-toc"><code>markdown.toc</code></a> 选项来配置。</p> <h2 id="自定义容器"><a href="#自定义容器" class="header-anchor">#</a> 自定义容器 <span class="badge tip" style="vertical-align:top;" data-v-c13ee5b0>默认主题</span></h2> <p><strong>输入</strong></p> <div class="language-md extra-class"><pre class="language-md"><code>::: tip
这是一个提示
:::

::: warning
这是一个警告
:::

::: danger
这是一个危险警告
:::

::: details
这是一个详情块，在 IE / Edge 中不生效
:::
</code></pre></div><p><strong>输出</strong></p> <div class="custom-block tip"><p class="custom-block-title">提示</p> <p>这是一个提示</p></div> <div class="custom-block warning"><p class="custom-block-title">注意</p> <p>这是一个警告</p></div> <div class="custom-block danger"><p class="custom-block-title">警告</p> <p>这是一个危险警告</p></div> <p>::: details
这是一个详情块，在 IE / Edge 中不生效
:::</p> <p>你也可以自定义块中的标题：</p> <div class="language-md extra-class"><pre class="language-md"><code>::: danger STOP
危险区域，禁止通行
:::

::: details 点击查看代码
<span class="token code"><span class="token punctuation">```</span><span class="token code-language">js</span>
<span class="token code-block language-js">console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'你好，VuePress！'</span><span class="token punctuation">)</span></span>
<span class="token punctuation">```</span></span>
:::
</code></pre></div><div class="custom-block danger"><p class="custom-block-title">STOP</p> <p>危险区域，禁止通行</p></div> <p>::: details 点击查看代码</p> <div class="language-js extra-class"><pre class="language-js"><code>console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'你好，VuePress！'</span><span class="token punctuation">)</span>
</code></pre></div><p>:::</p> <p><strong>参考:</strong></p> <ul><li><a href="https://vuepress.github.io/plugins/container/" target="_blank" rel="noopener noreferrer">vuepress-plugin-container<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul> <h2 id="代码块中的语法高亮"><a href="#代码块中的语法高亮" class="header-anchor">#</a> 代码块中的语法高亮</h2> <p>VuePress 使用了 <a href="https://prismjs.com/" target="_blank" rel="noopener noreferrer">Prism<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> 来为 markdown 中的代码块实现语法高亮。Prism 支持大量的编程语言，你需要做的只是在代码块的开始倒勾中附加一个有效的语言别名：</p> <p><strong>输入</strong></p> <div class="language- extra-class"><pre class="language-text"><code>``` js
export default {
  name: 'MyComponent',
  // ...
}
```
</code></pre></div><p><strong>输出</strong></p> <div class="language-js extra-class"><pre class="language-js"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
  name<span class="token operator">:</span> <span class="token string">'MyComponent'</span><span class="token punctuation">,</span>
  <span class="token comment">// ...</span>
<span class="token punctuation">}</span>
</code></pre></div><p><strong>输入</strong></p> <div class="language- extra-class"><pre class="language-text"><code>``` html
&lt;ul&gt;
  &lt;li
    v-for=&quot;todo in todos&quot;
    :key=&quot;todo.id&quot;
  &gt;
    {{ todo.text }}
  &lt;/li&gt;
&lt;/ul&gt;
```
</code></pre></div><p><strong>输出</strong></p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ul</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span>
    <span class="token attr-name">v-for</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>todo in todos<span class="token punctuation">&quot;</span></span>
    <span class="token attr-name">:key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>todo.id<span class="token punctuation">&quot;</span></span>
  <span class="token punctuation">&gt;</span></span>
    {{ todo.text }}
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>ul</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>在 Prism 的网站上查看 <a href="https://prismjs.com/#languages-list" target="_blank" rel="noopener noreferrer">合法的语言列表<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>。</p> <h2 id="代码块中的行高亮"><a href="#代码块中的行高亮" class="header-anchor">#</a> 代码块中的行高亮</h2> <p><strong>输入</strong></p> <div class="language- extra-class"><pre class="language-text"><code>``` js {4}
export default {
  data () {
    return {
      msg: 'Highlighted!'
    }
  }
}
```
</code></pre></div><p><strong>输出</strong></p> <div class="language-js extra-class"><div class="highlight-lines"><br><br><br><div class="highlighted"> </div><br><br><br><br></div><pre class="language-js"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
  <span class="token function">data</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token punctuation">{</span>
      msg<span class="token operator">:</span> <span class="token string">'Highlighted!'</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div><h2 id="行号"><a href="#行号" class="header-anchor">#</a> 行号</h2> <p>你可以通过配置来为每个代码块显示行号：</p> <div class="language-js extra-class"><pre class="language-js"><code>module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  markdown<span class="token operator">:</span> <span class="token punctuation">{</span>
    lineNumbers<span class="token operator">:</span> <span class="token boolean">true</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div> <ul><li>示例:</li></ul> <picture><source srcset="/line-numbers-desktop.png" media="(min-width: 719px)"> <img alt="Image" class="line-numbers-desktop-snap"></picture> <picture><source srcset="/line-numbers-mobile.gif" media="(max-width: 719px)"> <img alt="Image" class="line-numbers-mobile-snap"></picture> <h2 id="导入代码段"><a href="#导入代码段" class="header-anchor">#</a> 导入代码段 <span class="badge warning" style="vertical-align:top;" data-v-c13ee5b0>beta</span></h2> <p>你可以通过下述的语法导入已经存在的文件中的代码段：</p> <div class="language-md extra-class"><pre class="language-md"><code>&lt;&lt;&lt; @/filepath
</code></pre></div><p>它也支持 <a href="#%E4%BB%A3%E7%A0%81%E5%9D%97%E4%B8%AD%E7%9A%84%E8%A1%8C%E9%AB%98%E4%BA%AE">行高亮</a>：</p> <div class="language-md extra-class"><pre class="language-md"><code>&lt;&lt;&lt; @/filepath{highlightLines}
</code></pre></div><p><strong>输入</strong></p> <div class="language-md extra-class"><pre class="language-md"><code>&lt;&lt;&lt; @/../@vuepress/markdown/<span class="token bold"><span class="token punctuation">__</span><span class="token content">tests</span><span class="token punctuation">__</span></span>/fragments/snippet.js{2}
</code></pre></div><p><strong>输出</strong></p> <div class="language-md extra-class"><pre class="language-md"><code>&lt;&lt;&lt; @/../@vuepress/markdown/<span class="token bold"><span class="token punctuation">__</span><span class="token content">tests</span><span class="token punctuation">__</span></span>/fragments/snippet.js{2}
</code></pre></div> <div class="custom-block tip"><p class="custom-block-title">注意</p> <p>由于代码段的导入将在 webpack 编译之前执行，因此你无法使用 webpack 中的路径别名，此处的 <code>@</code> 默认值是 <code>process.cwd()</code>。</p></div> <h2 id="进阶配置"><a href="#进阶配置" class="header-anchor">#</a> 进阶配置</h2> <p>VuePress 使用 <a href="https://github.com/markdown-it/markdown-it" target="_blank" rel="noopener noreferrer">markdown-it<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> 来渲染 Markdown，上述大多数的拓展也都是通过自定义的插件实现的。想要进一步的话，你可以通过 <code>.vuepress/config.js</code> 的 <code>markdown</code> 选项，来对当前的 <code>markdown-it</code> 实例做一些自定义的配置：</p> <div class="language-js extra-class"><pre class="language-js"><code>module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  markdown<span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token comment">// markdown-it-anchor 的选项</span>
    anchor<span class="token operator">:</span> <span class="token punctuation">{</span> permalink<span class="token operator">:</span> <span class="token boolean">false</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token comment">// markdown-it-toc 的选项</span>
    toc<span class="token operator">:</span> <span class="token punctuation">{</span> includeLevel<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token function-variable function">extendMarkdown</span><span class="token operator">:</span> <span class="token parameter">md</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
      <span class="token comment">// 使用更多的 markdown-it 插件!</span>
      md<span class="token punctuation">.</span><span class="token function">use</span><span class="token punctuation">(</span><span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'markdown-it-xxx'</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/fengxinming/vuepress-theme-purple/edit/master/zh/guide/markdown.md" target="_blank" rel="noopener noreferrer">在 GitHub 上编辑此页</a> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></div> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2020-1-13 19:52:43</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/vuepress-theme-purple/zh/guide/assets.html" class="prev">静态资源</a></span> <span class="next"><a href="/vuepress-theme-purple/zh/guide/using-vue.html">在 Markdown 中 使用 Vue</a>
      →
    </span></p></div> </main></div></div><div class="global-ui"><!----><!----></div></div>
    <script src="/vuepress-theme-purple/assets/js/app.a1c2f8fd.js" defer></script><script src="/vuepress-theme-purple/assets/js/5.ceb67ac2.js" defer></script><script src="/vuepress-theme-purple/assets/js/4.0adfbd1a.js" defer></script><script src="/vuepress-theme-purple/assets/js/13.30b10f5f.js" defer></script><script src="/vuepress-theme-purple/assets/js/7.18012d7b.js" defer></script><script src="/vuepress-theme-purple/assets/js/6.14f6ca82.js" defer></script>
  </body>
</html>
